﻿<%@ Page Title="Manage Products" Language="C#" MasterPageFile="~/AdminPages/AdminPanel.Master" AutoEventWireup="true" CodeBehind="ManageProducts.aspx.cs" Inherits="MasterPageGroupF3.AdminPages.WebForm5" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="content1">
    <div class="frame">
        <div class="head">
        </div>
        <div class="content-catalog">
            <div id="name-product">
                Manage Products
            </div>
            <div id="function">
                <ul>
                     <li><asp:ImageButton ID="Add" runat="server" ImageUrl="../images/Add.png" 
                             ToolTip="Add" ImageAlign="Middle" onclick="Add_Click"  /></li>
                     <li><asp:ImageButton ID="Edit" runat="server" ImageUrl="../images/edit.png" ToolTip="Edit" ImageAlign="Middle" OnClick="Edit_Click"/></li>
                     <li><asp:ImageButton ID="Delete" runat="server" ImageUrl="../images/delete.png" ToolTip="Delete" ImageAlign="Middle" OnClick="Delete_Click"/></li>
                     <li><asp:ImageButton ID="Help" runat="server" ImageUrl="../images/help.png" ToolTip="Help" ImageAlign="Middle" OnClick="Help_Click"/></li>       
                </ul>
                
            </div>
            <div class="clear">
            </div>
        </div>
        <div class="tail">
        </div>
    </div>
    <div class="frame">
        <div class="head">
        </div>
        <div class="provider">
           
                <div id="search">
                    <asp:Label ID="Label1" runat="server" Text="Filter"></asp:Label>
                    <asp:TextBox runat="server" Width="150" ID="txtsearch" ></asp:TextBox>
                    <asp:Button runat="server"  ID="btsearch" Text="Go" OnClick="Go_Click"/>                    
                    <asp:Button runat="server" ID="btreset" Text="Reset" onclick="btreset_Click" />
                </div>
                <div id="listprovider">
                    
                    
                    <asp:GridView ID="GridProduct"  runat="server"  
                        AllowPaging="True" PageSize="5" AutoGenerateColumns = "False" 
                        CellPadding  = "10" ForeColor    = "#333333" GridLines="None" OnPageIndexChanging="GridProduct_PageIndexChanging">
                        <Columns>
                            <asp:TemplateField HeaderText="Chọn" ItemStyle-Width="40">
                                <ItemTemplate>
                                   <asp:CheckBox ID="chk" runat="server" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField HeaderText="Mã" DataField="IDPRODUCT" ItemStyle-Width="20">
                                  
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="Nhà cung cấp" ItemStyle-Width="200">
                                <ItemTemplate>
                                   <%#Eval("PROVIDER.NAME") %>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Tên sản phẩm" ItemStyle-Width="200">
                                <ItemTemplate>
                                   <%#(Eval("SLOGAN").ToString().Length > 50) ? Eval("SLOGAN").ToString().Substring(0, 50).Insert(50, "...") : Eval("SLOGAN").ToString() %>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField HeaderText="Giá" DataField="PRICE" ItemStyle-Width="100"></asp:BoundField>
                            <asp:BoundField HeaderText="Min" DataField="MIN_NUMBER" ItemStyle-Width="80" >         </asp:BoundField>
                            <asp:BoundField HeaderText="Kết thúc" DataField="TIME_STOP" ItemStyle-Width="80" >         </asp:BoundField>
                            <asp:TemplateField HeaderText="Thành phố" ItemStyle-Width="150">
                                <ItemTemplate>
                                   <%#Eval("CITY.NAME")%>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <%-- <asp:TemplateField HeaderText="Tên sản phẩm" ItemStyle-Width="150">
                                <ItemTemplate>
                                   <%#(Eval("CONTENT").ToString().Length > 70) ? Eval("CONTENT").ToString().Substring(0, 70).Insert(69, "...") : Eval("CONTENT").ToString() %>
                                </ItemTemplate>
                            </asp:TemplateField>--%>
                            <asp:BoundField HeaderText="Trạng thái" DataField="STATUS" ItemStyle-Width="80" >         </asp:BoundField>
                        </Columns>
                        <HeaderStyle         BackColor="#938fc0" ForeColor="#FFFFFF" Font-Bold="True" />
                        <RowStyle            BackColor="#dfeadb" />
                        <AlternatingRowStyle BackColor="#FFFFFF" />
                        <PagerStyle          BackColor="WhiteSmoke" ForeColor="#000" HorizontalAlign="Center" />
                        
                        

                     </asp:GridView>
                     
                </div>  
                           
        </div>
        <div class="tail">
        </div>
    </div>
    </div>

</asp:Content>
